#ifndef _SYS_STR_IN_STREAM_H_
#define _SYS_STR_IN_STREAM_H_

#include "InStream.h"
#include "SysTypes.h"

#define STR_IN_STREAM_VTABLE(self)   ((StrInStreamVTable*)((FanObj*)self)->vtable)


extern Type*    StrInStream_classType;
extern VTable*  StrInStream_classVTable;


/* [sys::StrInStream] Attributes */
struct StrInStream
{
  InStream      super;
  Str*          str;
  Int           pos;
  List*         pushback;
};


/* [sys::StrInStream] Virtual-table */
typedef struct StrInStreamVTable
{
  InStreamVTable super;
} StrInStreamVTable;


/* [sys::StrInStream] Methods and fields */
void            StrInStream_make(StrInStream* self, Str* str);
NullableInt     StrInStream_read(InStream* self);
NullableInt     StrInStream_readBuf(InStream* self, Buf* buf, Int n);
InStream*       StrInStream_unread(InStream* self, Int b);
NullableInt     StrInStream_readChar(InStream* self);
InStream*       StrInStream_unreadChar(InStream* self, Int b);


/* [sys::StrInStream] Methods and fields */
StrInStream*    StrInStream_new(Str* str);


/* [sys::StrInStream] Type-system functions */
Type*           StrInStream_initType(void);
VTable*         StrInStream_initVTable(void);
void            StrInStream_initStatic(void);


#endif
